﻿namespace Hotfix
{
    public interface IMessageHandler
    {
        void Hander(AMRequest aResponse);
    }

    /// <summary>
    /// 抽象消息管理
    /// </summary>
    /// <typeparam name="Respone"></typeparam>
    public abstract class AMHandler<Respone> : IMessageHandler where Respone : AMResponse
    {
        public abstract void Do(Respone respone);
        public void Hander(AMRequest aResponse)
        {
            if (aResponse == null) return;

            Do(aResponse as Respone);
        }

    }
}
